package com.sixmac.entity;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 账户
 */
@Entity
@Table(name = "account")
public class Account {
    private Integer id;
    private String num;
    private String mobile;
    private String name;
    private Double money;
    private Double nowWater;
    private Double prevWater;
    private Double schedule;
    private Date createTime;
    private List<AppUser> appUserList = new ArrayList<AppUser>();
    private List<WxUser> wxUserList = new ArrayList<WxUser>();

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Column(name = "now_water")
    public Double getNowWater() {
        return nowWater;
    }

    public void setNowWater(Double nowWater) {
        this.nowWater = nowWater;
    }

    @Column(name = "prev_water")
    public Double getPrevWater() {
        return prevWater;
    }

    public void setPrevWater(Double prevWater) {
        this.prevWater = prevWater;
    }

    public Double getSchedule() {
        return schedule;
    }

    public void setSchedule(Double schedule) {
        this.schedule = schedule;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Transient
    public List<AppUser> getAppUserList() {
        return appUserList;
    }

    public void setAppUserList(List<AppUser> appUserList) {
        this.appUserList = appUserList;
    }

    @Transient
    public List<WxUser> getWxUserList() {
        return wxUserList;
    }

    public void setWxUserList(List<WxUser> wxUserList) {
        this.wxUserList = wxUserList;
    }
}
